package com.lcn.tasks;

import lombok.extern.slf4j.Slf4j;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Component;

/**
 * 发送短信验证码任务
 */
@Component
@Slf4j
public class SmsTask {

    /**
     * 异步发送
     */
    @Async
    public void sendSms(String mobile, String code) {
        log.info("发送了短信验证码，mobile={},code={}", mobile, code);
    }

}
